Page({
  data:{
    marketList:[]
  },

  onChange:function(e){
    var that =this;
    wx.request({
      url: 'https://www.chessunyan.asia:9090/user/selectMarketHot',
      method:'GET',
      success:function(res){
        if(res.statusCode===200){
          that.setData({
            marketList:res.data
          })
          console.log(that.data.marketList);
        }else{
          wx.showToast({
            title: '获取失败',
          })
        }
      },
      fail:function(){
        wx.showToast({
          title: '请求失败',
        })
      }
    })
  },

  onTouchStart:function(e){
    this.setData({
      imageScale:1.1
    });
  },
  onTouchEnd:function(e){
    this.setData({
      imageScale:1
    })
  },

  onShow:function(){
    //自定义tabbar
    if(typeof this.getTabBar==="function"&&this.getTabBar()){
      this.getTabBar().setData({
        selected:0,
      });
    }
  },
})